<template>
    <div class="desc-main">
        <h3>{{cont.title}}</h3>
        <hr>
        <div class="content" v-html="cont.content">
        </div>
    </div>
</template>

<script>
    import axios from "axios"


    export default {
        name: "desc",
        data(){
            return{
                id: this.$route.params.id,
                cont:{}
            }
        },
        methods:{
            getmes(){
                axios.get("api/goods/getdesc/"+ this.id)
                    .then(suc=>{
                        this.cont = suc.data.message[0]
                    })
                    .catch(err=>{
                        console.log(err)
                    })
            }
        },
        created() {
            this.getmes()
        }
    }
</script>

<style lang="less">
    .desc-main{
        h3{
            font-size: 14px;
            text-align: center;
            color: deepskyblue;
        }
        .content{
            padding: 0 5px;
            img{
                width: 100%;
            }
        }
    }
</style>